<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>N3RD CH4T: /Users/plamontagna/Documents/spa-cs340project/ChatServer/clientinformation.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">N3RD CH4T
   &#160;<span id="projectnumber">Final Version</span>
   </div>
   <div id="projectbrief">CS340 Project</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">/Users/plamontagna/Documents/spa-cs340project/ChatServer/clientinformation.h</div>  </div>
</div>
<div class="contents">
<a href="clientinformation_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00018"></a>00018 <span class="comment"></span><span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef CLIENTINFORMATION_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define CLIENTINFORMATION_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;QList&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;QTcpSocket&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;QStringList&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;QObject&gt;</span>
<a name="l00027"></a>00027 
<a name="l00036"></a><a class="code" href="classclient_information.html">00036</a> <span class="keyword">class </span><a class="code" href="classclient_information.html" title="Client helper methods.">clientInformation</a>: <span class="keyword">public</span> QObject
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038 Q_OBJECT
<a name="l00039"></a>00039     <span class="keyword">public</span>:
<a name="l00041"></a>00041         <a class="code" href="classclient_information.html#a7190d81646cf44fde129d34446bafa97" title="Constructor with name and socket.">clientInformation</a>(QString name, QTcpSocket* socket);
<a name="l00042"></a>00042 
<a name="l00044"></a>00044         <a class="code" href="classclient_information.html#a7190d81646cf44fde129d34446bafa97" title="Constructor with name and socket.">clientInformation</a>(QString name, QStringList friendsList);
<a name="l00045"></a>00045 
<a name="l00052"></a>00052         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#a002396f42cea76e92b47f8967afea8ad" title="Updates the current socket to a new socket.">updateSocket</a>(QTcpSocket* sockToUpdateTo);
<a name="l00053"></a>00053 
<a name="l00060"></a>00060         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#ab54225eaa4950b985aed1fc1afa8e743" title="Sends a list of friends online.">sendOnlineFriendsList</a>(QList&lt;QString&gt; serverUsersOnline);
<a name="l00061"></a>00061 
<a name="l00064"></a>00064         QTcpSocket* <a class="code" href="classclient_information.html#a5edd8226de076e4819ed0c4890314403">getSocket</a>();
<a name="l00065"></a>00065 
<a name="l00068"></a>00068         QString <a class="code" href="classclient_information.html#a720595dfe2672915c93a32b23247b96e">getUserName</a>();
<a name="l00069"></a>00069 
<a name="l00079"></a>00079         <span class="keywordtype">bool</span> <a class="code" href="classclient_information.html#af9bf597778e57d9e35d9b754a6ab7bcc" title="Sends message passed in to the person in the parameters with the time the message was sent at...">sendMessage</a>(QString personThatSentMessage, QString message, QString timeSentAt);
<a name="l00080"></a>00080 
<a name="l00088"></a>00088         <span class="keywordtype">bool</span> <a class="code" href="classclient_information.html#a2cd9e345db3e81e13774caa8d177c1e1" title="Adds the parameter user to the friends list of this user.">addToFriendsList</a>(<a class="code" href="classclient_information.html" title="Client helper methods.">clientInformation</a>* buddy);
<a name="l00089"></a>00089 
<a name="l00097"></a>00097         <span class="keywordtype">bool</span> <a class="code" href="classclient_information.html#ae1b4d3d1500f4579a84493244ef8bde2" title="Removes the parameter user to the friends list of this user.">removeFromFriendsList</a>(<a class="code" href="classclient_information.html" title="Client helper methods.">clientInformation</a>* nonFriend);
<a name="l00098"></a>00098 
<a name="l00106"></a>00106         <span class="keywordtype">bool</span> <a class="code" href="classclient_information.html#ace9eaf311dea9e224a428f6146a387e9" title="Checks whether or not the parameter friend is in the friends list of this user.">isUserFriend</a>(QString user);
<a name="l00107"></a>00107 
<a name="l00108"></a>00108     <span class="keyword">public</span> slots:
<a name="l00116"></a>00116         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#a9edc0627eca71bb833a5b250ce5d1b78" title="Slot to handle the signal from removing a friend.">handleRemoveFriend</a>(<a class="code" href="classclient_information.html" title="Client helper methods.">clientInformation</a>* personSendingRequest, <span class="keywordtype">bool</span> isValid);
<a name="l00117"></a>00117 
<a name="l00125"></a>00125         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#ae2f64901a317f6b151e352e3054ab731" title="Slot to handle the signal from whether or not a valid remove friend request wsa sent.">handleIsValidRemoveFriend</a>(QString personToRemove, <span class="keywordtype">bool</span> isValid);
<a name="l00126"></a>00126 
<a name="l00133"></a>00133         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#af6949cea8c0b3d89741e2915fe4eee83" title="Slot to handle the signal from adding a friend. The object that calls this slot is the user that the ...">handleAddFriend</a>(QString personSendingRequest);
<a name="l00134"></a>00134 
<a name="l00142"></a>00142         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#a520f5d73a13e6b6464673d4df8724116" title="Slot to handle the signal from checking if the friend request that was sent is valid or not...">handleIsValidFriendRequest</a>(QString personToAdd, <span class="keywordtype">bool</span> isValid);
<a name="l00143"></a>00143 
<a name="l00151"></a>00151         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#ae3a38d29143c06cffba8385cbb648809" title="Slot to handle the signal from a friend acceptance. The user that calls this slot is the user that is...">handleFriendAcceptance</a>(<a class="code" href="classclient_information.html" title="Client helper methods.">clientInformation</a>* sentUser, <span class="keywordtype">bool</span> isAccepted);
<a name="l00152"></a>00152 
<a name="l00162"></a>00162         <span class="keywordtype">void</span> <a class="code" href="classclient_information.html#aebdd7540395148bab15b27ac0ae63968" title="Slot to handle the signal from a sent message. The user that calls this slot is the user that is send...">handleSendMessage</a>(QString fromUser, QString toUser, QString message, QString timeSent);
<a name="l00163"></a>00163 
<a name="l00164"></a>00164     <span class="keyword">private</span>:
<a name="l00165"></a>00165 
<a name="l00170"></a><a class="code" href="classclient_information.html#a0142b2adaae615cc2972937f71af6d53">00170</a>         QStringList <a class="code" href="classclient_information.html#a0142b2adaae615cc2972937f71af6d53" title="StringList that contains the individual strings of the friends of this user.">stringListOfFriends</a>;
<a name="l00171"></a>00171 
<a name="l00176"></a><a class="code" href="classclient_information.html#a6ebc6a454c29fb48ed90931093e966bc">00176</a>         QHash&lt;QString, clientInformation*&gt; <a class="code" href="classclient_information.html#a6ebc6a454c29fb48ed90931093e966bc" title="Table that contains the name of the user and its corresponding clientInformation object pointer...">tableOfFriends</a>;
<a name="l00177"></a>00177 
<a name="l00182"></a><a class="code" href="classclient_information.html#a544931963ab7110241057edeab615bce">00182</a>         QString <a class="code" href="classclient_information.html#a544931963ab7110241057edeab615bce" title="Username of this person.">userName</a>;
<a name="l00183"></a>00183 
<a name="l00188"></a><a class="code" href="classclient_information.html#a58ca7874597d3b4e187b47ee249eca88">00188</a>         QTcpSocket* <a class="code" href="classclient_information.html#a58ca7874597d3b4e187b47ee249eca88" title="TcpSocket used in order to talk to the user.">sock</a>;
<a name="l00189"></a>00189 };
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 <span class="preprocessor">#endif // CLIENTINFORMATION_H</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 29 2011 23:53:09 for N3RD CH4T by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
